package net.stogi.dsper.ui.client;

import net.stogi.common.gwt.dispatch.client.core.ActionManager;
import net.stogi.common.gwt.dispatch.client.core.impl.ActionManagerImpl;
import net.stogi.common.gwt.frame.client.core.ApplicationManager;
import net.stogi.common.gwt.frame.client.core.CacheManager;
import net.stogi.common.gwt.frame.client.core.EventBus;
import net.stogi.common.gwt.frame.client.core.LayoutManager;
import net.stogi.common.gwt.frame.client.core.impl.BasicCacheManagerImpl;
import net.stogi.common.gwt.frame.client.core.impl.EventBusImpl;
import net.stogi.common.gwt.frame.client.module.ModuleFactoryRegistry;
import net.stogi.common.gwt.frame.client.module.impl.BasicModuleFactoryRegistry;

import com.google.gwt.core.client.EntryPoint;

public class DsperUi implements EntryPoint {

	@Override
	public void onModuleLoad() {
		final ActionManager actionManager = new ActionManagerImpl();

		final CacheManager cacheManager = new BasicCacheManagerImpl();

		final EventBus eventBus = new EventBusImpl();

		final LayoutManager layoutManager = new DsperUiLayoutManagerImpl();

		final ModuleFactoryRegistry moduleFactoryRegistry = new BasicModuleFactoryRegistry();

		final ApplicationManager applicationManager = new DsperUiApplicationManagerImpl(actionManager, cacheManager, eventBus,
				layoutManager, moduleFactoryRegistry);

		applicationManager.run();
	}
}
